home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / WarriorsProgress.sit / Warrior’s Progress / source code / Source / Libraries / Idle / Postponer.h < prev    next >
Text File  |  1997-06-28  |  577b  |  41 lines

  1. // Postponer.h
  2.  
  3. #ifndef Postponer_h
  4. #define Postponer_h
  5.  
  6. #ifndef ListLink_h
  7. #include "ListLink.h"
  8. #endif
  9. #ifndef Tick_h
  10. #include "Tick.h"
  11. #endif
  12. #ifndef ListOf_h
  13. #include "ListOf.h"
  14. #endif
  15.  
  16. class Method;
  17.  
  18. class Postponer
  19.   {
  20.     private:
  21.         ListLink< Postponer > link;
  22.         const Method& perform;
  23.         
  24.         static ListOf< Postponer >& TheList();
  25.         
  26.     public:
  27.         Postponer( const Method& );
  28.         ~Postponer();
  29.         
  30.         bool Pending() const        { return link.Owned(); }
  31.         void Schedule();
  32.         void Cancel();
  33.         
  34.         void Flush();
  35.         
  36.         static void Execute( Tick stop );
  37.         static bool CanSleep();
  38.   };
  39.  
  40. #endif
  41.